package com.library.web.controller.vo;

import com.library.domain.BoBook;
import lombok.Data;

import java.io.Serializable;

/**
 * @Author julyWhj
 * @Description $
 * @Date 2022/3/28 10:49 下午
 **/
@Data
public class BookModel implements Serializable {

    private String bookName;
    private String bookNo;
    private String author;
    private String bookStatus;
    private String bookCoverPhoto;
    private String bookDescription;

    public static BookModel toModel(BoBook boBook) {
        BookModel bookModel = new BookModel();
        bookModel.setBookNo(boBook.getBookNo());
        bookModel.setBookName(boBook.getBookName());
        bookModel.setBookCoverPhoto(boBook.getBookCoverPhoto());
        bookModel.setAuthor(boBook.getAuthor());
        bookModel.setBookStatus(boBook.getBookStatus());
        return bookModel;
    }
}
